package xuanke;
import java.util .List;
import java.util.LinkedList;
public class Classlist {
	List zclasss = new LinkedList<>();
	List tclasss = new LinkedList<>();
	List kclasss = new LinkedList<>();
	public void kaike(int a1,int a2,int a3) {
		
		System.out.println("教师信息");
		
		Teacher t1 = new Teacher("1","教师1","男","课程1",a1);
		t1.printTeacher();
		Teacher t2 = new Teacher("2","教师2","男","课程2",a2);
		t2.printTeacher();
		Teacher t3 = new Teacher("3","教师3","男","课程3",a3);
		t3.printTeacher();
		
		System.out.println("课程信息");
		
		Course c1 = new Course(t1.Tnum,t1.Tclasss,"教学楼","10:00",t1.Tname);
		c1.cunCourse();
		Course c2 = new Course(t2.Tnum,t2.Tclasss,"教学楼","8:00",t2.Tname);
		c2.cunCourse();
		Course c3 = new Course(t3.Tnum,t3.Tclasss,"教学楼","13:30",t3.Tname);
		c3.cunCourse();

		zclasss.add(c1.numbers);
		zclasss.add(c2.numbers);
		zclasss.add(c3.numbers);
		tclasss.add(t1.numbers);
		tclasss.add(t2.numbers);
		tclasss.add(t3.numbers);
		for(int i=0;i<zclasss.size();i++) {
			List a = (List)tclasss.get(i);
			int sum = (int)a.get(a.size()-1);
			if(sum == 1) {
				kclasss.add(zclasss.get(i));
				System.out.println(zclasss.get(i));
			}
			else {
				System.out.println("教师"+a.get(0)+"未开课");
			}
		}
	}
	public void show2(List b) {
		if(b.size()<1) {
			System.out.println("null");
		}
		else {
			for(int i=0;i<b.size();i++) {
				List a = (List)b.get(i);
				System.out.println("编号："+a.get(a.size()-1)+"  课程名称："+a.get(0)+
						"  上课地点："+a.get(1)+"  上课时间："+a.get(2)+
						"  授课教师："+a.get(3));
			}
		}
	}
}